import request from '@/utils/request'

export function getDefectBasicData(params) {
  return request({
    url: '/cms/defectInfo/getDefectBasicData',
    method: 'get',
    params: params
  })
}

export function getDefectSectionTableList(params) {
  return request({
    url: '/cms/defectDept/getDefectSectionTableList',
    method: 'post',
    data: params
  })
}

export function getDeviceStatic(params) {
  return request({
    url: '/cms/EquipmentDivceAttr/getDeviceStatic',
    method: 'get',
    params: params
  })
}

// 6C进度分析
export function analyseProgress(params) {
  return request({
    url: '/cms/mock/analyseProgress',
    method: 'get',
    params: params
  })
}

// 缺陷基本信息
export function basicDefectInfo(params) {
  return request({
    url: '/cms/defectInfo/basicDefectInfo',
    method: 'post',
    data: params
  })
}

// 周期检测覆盖
export function cycleCheckCover(params) {
  return request({
    url: '/cms/planDetail/getCycleCheckCover',
    method: 'post',
    data: params
  })
}
// 缺陷单位分布
export function defectUnitDistribute(params) {
  return request({
    url: '/cms/defectInfo/defectDeptDistribute',
    method: 'post',
    data: params
  })
}

// 预警信息
export function earlyWarning(params) {
  return request({
    url: '/cms/warnInformation/listPage',
    method: 'post',
    data: params
  })
}

// 数据检测统计
export function testDataStatistics(params) {
  return request({
    url: '/cms/planDetail/testDataStatistics',
    method: 'post',
    data: params
  })
}

// 原始数据检测
export function originalDataCheck(params) {
  return request({
    url: '/cms/mock/originalDataCheck',
    method: 'get',
    params: params
  })
}
// 本年度检测计划完成率
export function testPlanCompleteRate(params) {
  return request({
    url: '/cms/cmsIndex/testPlanCompleteRate',
    method: 'get',
    params: params
  })
}

// 检测计划超期预警情况-计划
export function getPlanOverWarn(params) {
  return request({
    url: '/cms/planDetail/getPlanOverWarn',
    method: 'post',
    data: params
  })
}

// 检测计划超期预警情况-缺陷
export function getDefectOverWarn(params) {
  return request({
    url: '/cms/defectInfo/getDefectOverWarn',
    method: 'post',
    data: params
  })
}

// 检测数据详情-检测数据线路分布
export function checkDataLineDistribution(data) {
  return request({
    url: '/cms/planDetail/checkDataLineDistribution',
    method: 'post',
    data: data
  })
}

// 检测数据详情-检测数据月份分布
export function checkDataMonthDistribution(data) {
  return request({
    url: '/cms/planDetail/checkDataMonthDistribution',
    method: 'post',
    data: data
  })
}

// 检测计划兑现详情-周期检测执行情况
export function checkPlanCashDetail(data) {
  return request({
    url: '/cms/planDetail/checkPlanCashDetail',
    method: 'post',
    data: data
  })
}

// 检测计划兑现详情-超期未执行线路Top5
export function unexecutedLineTop5(data) {
  return request({
    url: '/cms/planDetail/unexecutedLineTop5',
    method: 'post',
    data: data
  })
}
// 缺陷单位分布-缺陷周期
export function getDefectCycle(data) {
  return request({
    url: '/cms/defectInfo/getDefectCycle',
    method: 'post',
    data: data
  })
}
// 缺陷单位分布-未处理缺陷分布
export function getUntreatedDefect(data) {
  return request({
    url: '/cms/defectInfo/getUntreatedDefect',
    method: 'post',
    data: data
  })
}
// 缺陷单位分布-未处理缺陷类型分布
export function getUntreatedDefectType(data) {
  return request({
    url: '/cms/defectInfo/getUntreatedDefectType',
    method: 'post',
    data: data
  })
}
// 获取车间
export function getDeptByTypeCode() {
  return request({
    url: '/cms/sysm/share/dept/',
    method: 'get',
    params: {
      deptTypeCode: '012'
    }
  })
}

// 获取行别
export function getDirection() {
  return request({
    url: '/cms/direction/getList',
    method: 'get'

  })
}
// 周期检测覆盖详情-未覆盖区站
export function uncoveredAreaStation(data) {
  return request({
    url: '/cms/planDetail/uncoveredAreaStation',
    method: 'post',
    data: data
  })
}
// 周期检测覆盖详情-未覆盖区站(线路下的未覆盖区站的详情)
export function uncoveredAreaStationDetail(data) {
  return request({
    url: '/cms/planDetail/uncoveredAreaStationDetail',
    method: 'post',
    data: data
  })
}

// 分析进度 - 线路分析进度
export function getLineProgress(data) {
  return request({
    url: '/cms/anPro/getLineProgress',
    method: 'post',
    data: data
  })
}
// 分析进度 - 进度排名
export function getProgressSort(data) {
  return request({
    url: '/cms/anPro/getProgressSort',
    method: 'post',
    data: data
  })
}

// 缺陷基本信息 -缺陷分布
export function getDefect(data) {
  return request({
    url: '/cms/defectInfo/getDefect',
    method: 'post',
    data: data
  })
}

// 缺陷基本信息 - 缺陷设备分布TOP5
export function getDefectDeviceTop5(data) {
  return request({
    url: '/cms/defectInfo/getDefectDeviceTop5',
    method: 'post',
    data: data
  })
}

// 缺陷基本信息 - 缺陷类型分布TOP10
export function getDefectTypeTop10(data) {
  return request({
    url: '/cms/defectInfo/getDefectTypeTop10',
    method: 'post',
    data: data
  })
}

// 缺陷基本信息 - 缺陷6C类型分布
export function getDefectType_6C(data) {
  return request({
    url: '/cms/defectInfo/getDefectType_6C',
    method: 'post',
    data: data
  })
}

// 查询设备超周期预警提醒信息
export function getOverCycleWarning() {
  return request({
    url: '/jcwRepairgz/deviceRepairCount/getOverCycleWarning',
    method: 'GET'
  })
}
